{# 
    # flask对话网页，使用input输入一个问题, 调用zhipuAI库，使用glm-4-flash模型输出一个回答补全对话。
    # 将对话记录history都显示在网页上。循环问答，输入/quit后中止。
#}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Flask Chat</title>
    <link type="text/css" rel="stylesheet" href="{{ url_for('static', filename='style_app5.css') }}">
 
    
</head>
<body>
    <div class='container'>
    <h1>Flask Chat</h1>
    <form method="post">
        <input type="text" name="question" placeholder="Ask me anything...">
        <input type="submit" value="Submit">
    </form>
    </div>
    <div class='result'>
        <h2>History</h2>
        <ul>
            {% for message in history %}
                <li>{{ message }}</li>
            {% endfor %}
        </ul>
    </div>
</body>
</html>

